Implemented a fully functional 32-bit RISC-V CPU in Logisim Evolution, including core modules such as the ALU (arithmetic, logic, shift, multiply), Register File with 32 registers (x0 hardwired to zero), Immediate Generator, Control Logic, and aligned Data Memory with write masks. The design was extended into a two-stage pipelined processor (IF, ID/EX/MEM/WB) with branch flush handling, supporting arithmetic, load/store, branch, and jump instructions.
During the process, I learned to carefully examine Logisim components and design datapath hierarchies. For example, splitters and sign-extenders were essential in implementing shifters and multiplication, while DeMux and tunnels simplified the Register File wiring. Building the single-cycle datapath helped me understand instruction fields and immediate generation, and later extending it to a pipeline taught me how to manage flushes and control hazards.
The most challenging part was memory alignment and write masks: handling unaligned addresses required bit manipulation and edge-case debugging. Finally, extensive testing with provided harnesses, custom testbenches, and community feedback helped uncover subtle bugs that normal cases did not reveal. Overall, this project gave me hands-on experience in computer architecture, datapath construction, and debugging a working CPU from the ground up.
![]() |
![]() |
![]() |
![]() |
![]() tohost for test output. |
![]() |
![]() |
![]() |